'use strict';
module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.createTable('Inventories', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      unit: {
        type: Sequelize.STRING
      },
      price1: {
        type: Sequelize.DOUBLE
      },
      nubmer1: {
        type: Sequelize.INTEGER
      },
      money1: {
        type: Sequelize.DOUBLE
      },
      price2: {
        type: Sequelize.DOUBLE
      },
      number2: {
        type: Sequelize.INTEGER
      },
      money2: {
        type: Sequelize.DOUBLE
      },
      in_time: {
        type: Sequelize.DATE
      },
      price3: {
        type: Sequelize.DOUBLE
      },
      number3: {
        type: Sequelize.INTEGER
      },
      out_time: {
        type: Sequelize.DATE
      },
      money3: {
        type: Sequelize.DOUBLE
      },
      price4: {
        type: Sequelize.DOUBLE
      },
      number4: {
        type: Sequelize.INTEGER
      },
      money4: {
        type: Sequelize.DOUBLE
      },
      remarks: {
        type: Sequelize.STRING
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  down: async (queryInterface, Sequelize) => {
    await queryInterface.dropTable('Inventories');
  }
};